import pygame
from pygame.locals import *
from sys import exit
from PictureClass import *
from Picture import *
from MainWindow import *

SCREEN_SIZE = (800, 600)

pygame.init()
pygame.display.set_caption("Viewer of Photos")
background = pygame.image.load("Pictures/black-background.jpg")
mainWindow = MainWindow("Pictures/open.jpg")

buttonOpen = Picture("Pictures/open.jpg", (0, 0) )
screen = pygame.display.set_mode(SCREEN_SIZE, 0, 32)
pictureClass = PictureClass()
mainWindow = MainWindow("Pictures/open.jpg")
fullScreen = False
picture = None

while True:
    for event in pygame.event.get():
        if event.type == QUIT:
            exit()
    
    if event.type == MOUSEBUTTONDOWN:
        x, y = pygame.mouse.get_pos()
        if buttonOpen.getRect().collidepoint(x, y):
            print MainWindow("Pictures/open.jpg").open()
            
                
    fullScreen = pictureClass.fullScreen(SCREEN_SIZE, event, fullScreen)
    screen.blit(background, (0, 0))
    screen.blit(buttonOpen.getImage(), (0, 0))
    pygame.display.update()
















